package com.kingmed.kmss.framework.feign.client.auth;

import com.kingmed.kmss.common.dto.api.resp.admin.TokenAuthUserVo;
import com.kingmed.kmss.common.dto.auth.CustomMessageReq;
import com.kingmed.kmss.common.vo.CommonResponse;
import com.kingmed.kmss.framework.feign.client.bpmn.CommonBpmnFallbackService;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(value = "kmss-auth", url = "${internalService.authService.url}", contextId = "common-auth-interface", fallbackFactory = CommonBpmnFallbackService.class)
public interface CommonAuthFeignService {

	/**
	 * 	各个模块，都可以发消息到oa
	 */
	@PostMapping(value = "/auth/oa/sendMsg")
	CommonResponse<?> sendOaMsg(@RequestBody CustomMessageReq customMessageReq);

	/**
	 * 	提供给外围系统进行token验证
	 */
	@GetMapping(value = "/ext/auth/checkToken")
	CommonResponse<TokenAuthUserVo> checkToken(@RequestParam String token);

}
